Telegram Group & Telegram Channel
Что выведет данный код при запуске на Python 3.10+ (например, 3.11)?

📌 Подсказка: Обратите внимание на порядок проверок, на то, какие атрибуты попадают в others, и на использование __match_args__.

Ответ:

Automatic mode
Mode manual, другие ключи: ['threshold', 'debug']
Низкий порог 0
Краткое пояснение:

Для первого объекта (mode="auto", threshold=10) срабатывает первый case Config(mode="auto") → Automatic mode.

Для второго (mode="manual", threshold=5, debug=True) первый не совпадает, второй с threshold.

@Python_Community_ru



tg-me.com/Python_Community_ru/2585
Create:
Last Update:

Что выведет данный код при запуске на Python 3.10+ (например, 3.11)?

📌 Подсказка: Обратите внимание на порядок проверок, на то, какие атрибуты попадают в others, и на использование __match_args__.

Ответ:

Automatic mode
Mode manual, другие ключи: ['threshold', 'debug']
Низкий порог 0
Краткое пояснение:

Для первого объекта (mode="auto", threshold=10) срабатывает первый case Config(mode="auto") → Automatic mode.

Для второго (mode="manual", threshold=5, debug=True) первый не совпадает, второй с threshold.

@Python_Community_ru

BY Python Community




Share with your friend now:
tg-me.com/Python_Community_ru/2585

View MORE
Open in Telegram


Python Community Telegram | DID YOU KNOW?

Date: |

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

Python Community from br


Telegram Python Community
FROM USA